//
//  HomeViewController.m
//  SSIL
//
//  Created by 余胜民 on 16/5/11.
//  Copyright © 2016年 sanmy. All rights reserved.
//

#import "HomeViewController.h"
#import "HMessageViewController.h"
@interface HomeViewController ()

@end

@implementation HomeViewController

#pragma LifeCycle
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    [self setLeftBarButtonWithText:nil];
    [self showLoadingView];
    [self setRightBarButtonWithImage:[UIImage imageNamed:@"nav_message"] AndHighLightImage:[UIImage imageNamed:@"nav_message"]];
    [self.rightBarButton addTarget:self action:@selector(openMessageCenter) forControlEvents:UIControlEventTouchUpInside];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


- (void)setupRootView {
    
}
#pragma mark - Action
/**
 *  打开消息中心
 */
- (void)openMessageCenter {
    HMessageViewController *messageController = [[HMessageViewController alloc] init];
    
    messageController.hidesBottomBarWhenPushed = YES;
    
    [self.navigationController pushViewController:messageController animated:YES];
    
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
